<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Hard
  </div>
  <div>
   <h1 class="question_title">
    420. Strong Password Checker
   </h1>
   <p>
    A password is considered strong if below conditions are all met:
   </p>
   <ol>
    <li>
     It has at least 6 characters and at most 20 characters.
    </li>
    <li>
     It must contain at least one lowercase letter, at least one uppercase letter, and at least one digit.
    </li>
    <li>
     It must NOT contain three repeating characters in a row ("...aaa..." is weak, but "...aa...a..." is strong, assuming other conditions are met).
    </li>
   </ol>
   <p>
    Write a function strongPasswordChecker(s), that takes a string s as input, and return the
    <b>
     MINIMUM
    </b>
    change required to make s a strong password. If s is already strong, return 0.
   </p>
   <p>
    Insertion, deletion or replace of any one character are all considered as one change.
   </p>
  </div>
  <div>
   <h1 class="question_title">
    420. 强密码检验器
   </h1>
   <p>
    一个强密码应满足以下所有条件：
   </p>
   <ol>
    <li>
     由至少6个，至多20个字符组成。
    </li>
    <li>
     至少包含一个小写字母，一个大写字母，和一个数字。
    </li>
    <li>
     同一字符
     <strong>
      不能
     </strong>
     连续出现三次 (比如 "...aaa..." 是不允许的, 但是&nbsp;"...aa...a..." 是可以的)。
    </li>
   </ol>
   <p>
    编写函数&nbsp;strongPasswordChecker(s)，s 代表输入字符串，如果 s 已经符合强密码条件，则返回0；否则返回要将 s 修改为满足强密码条件的字符串所需要进行修改的
    <strong>
     最小
    </strong>
    步数。
   </p>
   <p>
    插入、删除、替换任一字符都算作一次修改。
   </p>
  </div>
 </body>
</html>